﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

//Author: ljj
//Date: 20190710
//Function: 增加hp上限buff(可叠加) 
public class RepeatableMaxHpIncrease : RepeatableBuff
{
    public override void BuffUp()
    {
        BattleObject bt = gameObject.GetComponent<BattleObject>();
        float maxhp = bt.getMaxHP();
        if (maxhp != -1)
        {
            maxhp += effect;
            bt.setMaxHP(maxhp);
        }
    }

    public override void BuffDown()
    {
        BattleObject bt = gameObject.GetComponent<BattleObject>();
        float maxhp = bt.getMaxHP();
        if (maxhp != -1)
        {
            maxhp -= effect;
            bt.setMaxHP(maxhp);
        }
    }
}


